package com.ihr360.oneclick.dao;

import com.ihr360.oneclick.dto.spreadsheet.SpreadsheetTempRowDto;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author tom
 * @date 17-12-19
 */
public interface SpreadsheetTempRowDao extends JpaRepository<SpreadsheetTempRowDto, String>, JpaSpecificationExecutor<SpreadsheetTempRowDto> {

    List<SpreadsheetTempRowDto> findBySpreadsheetId(String spreadsheetId);

    @Transactional
    void deleteBySpreadsheetId(String spreadsheetId);

    @Transactional
    void deleteBySpreadsheetIdIn(List<String> spreadsheetIdList);

    @Transactional
    void deleteByIdIn(List<String> spreadsheetIdList);

    long countBySpreadsheetId(String spreadsheetId);

}
